/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class DiagnosticoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression di_id_diagnostico;
	public final StringExpression descripcion;
	public final DateExpression fecha;
	
	public DiagnosticoDetachedCriteria() {
		super(orm.Diagnostico.class, orm.DiagnosticoCriteria.class);
		di_id_diagnostico = new IntegerExpression("di_id_diagnostico", this.getDetachedCriteria());
		descripcion = new StringExpression("descripcion", this.getDetachedCriteria());
		fecha = new DateExpression("fecha", this.getDetachedCriteria());
	}
	
	public DiagnosticoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.DiagnosticoCriteria.class);
		di_id_diagnostico = new IntegerExpression("di_id_diagnostico", this.getDetachedCriteria());
		descripcion = new StringExpression("descripcion", this.getDetachedCriteria());
		fecha = new DateExpression("fecha", this.getDetachedCriteria());
	}
	
	public PacienteDetachedCriteria createPacientePa_id_pacienteCriteria() {
		return new PacienteDetachedCriteria(createCriteria("pacientePa_id_paciente"));
	}
	
	public Diagnostico uniqueDiagnostico(PersistentSession session) {
		return (Diagnostico) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Diagnostico[] listDiagnostico(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Diagnostico[]) list.toArray(new Diagnostico[list.size()]);
	}
}

